package com.sudo.api;

import com.sudo.api.onload.OnloadSomething;
import com.sudo.service.admin.service.AdminBaseService;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * author：为道日损 2020-05-06 19:10
 * webSite：https://www.sudo.ren
 */
@Component
public class ApplicationRunnerImpl implements ApplicationRunner {

    @Resource
    private OnloadSomething onloadSomething;

    @Resource
    private AdminBaseService adminBaseService;


    @Override
    public void run(ApplicationArguments args) {
        adminBaseService.onLoadAllRoleMenuButtonAuth(null,null);
        adminBaseService.onLoadSysRoleUserToRedis(null);
        adminBaseService.onLoadMenuButtonToRedis(null);
        onloadSomething.onLoadSysCronTask();
        onloadSomething.onLoadRegistry();

    }
}
